﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DNNspot.LiveChat.DataModel
{
    public class ClientInfo
    {
        public int? ClientId { get; set; }
        public string Email { get; set; }
        public string FirstName { get; set; }
        public string Ip { get; set; }
        public string LastName { get; set; }
        public int? PortalId { get; set; }
        public int? UserId { get; set; }

        public string FullName
        {
            get { return string.Format("{0} {1}", FirstName, LastName); }
        }

        public string ShortName
        {
            get { return string.Format("{0} {1}", FirstName, LastName.Substring(0, 1)); }

        }

        public ClientInfo()
        {
            
        }

        public ClientInfo(Client client)
        {
            ClientId = client.ClientId;
            Email = client.Email;
            FirstName = client.FirstName;
            Ip = client.Ip;
            LastName = client.LastName;
            PortalId = client.PortalId;
            UserId = client.UserId;
        }
    }
}
